package cc.uncarbon.module.appapi.model.request;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.io.Serial;
import java.io.Serializable;



/**
 * 后台管理-新增/编辑评价 DTO
 */
@Accessors(chain = true)
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@Data
public class AppraiseInsertOrUpdateDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;


    @Schema(description = "主键ID", hidden = true, title = "仅更新时使用")
    private Long id;

    @Schema(description = "订单id", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "订单id不能为空")
    private Long orderId;

    @Schema(description = "评价内容", requiredMode = Schema.RequiredMode.REQUIRED)
    @Size(max = 255, message = "【评价内容】最长255位")
    @NotBlank(message = "评价内容不能为空")
    private String content;

    @Schema(description = "评分", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "评分不能为空")
    private Integer rate;

    @Schema(description = "店铺id")
    private Long storeId;

}
